package com.menghai;


public class AreaCode {
	
	//2位数字地区码 
	/*
	11北京�?2天津�?3河北�?4山西�?
	15内蒙古自治区21辽宁�?2吉林�?3黑龙江省
	31上海�?2江苏�?3浙江�?4安徽�?5福建�?
	36江西�?7山东�?1河南�?2湖北�?3湖南�?
	44广东�?5广西�?6海南�?0重庆�?1四川�?2贵州�?
	53云南�?4西藏自治�?1陕西�?2甘肃�?3青海�?
	64宁夏回族自治�?5新疆维吾尔自治区71台湾�?
	81香港特别行政�?2澳门特别行政�?
	*/
	public final static String BEIJING = "11";
	public final static String TIANJING = "12";
	public final static String HEBEI = "13";
	public final static String SHANXI = "14";
	public final static String NEIMENGGU = "15";
	public final static String LIAONING = "21";
	public final static String JILIN = "22";
	public final static String HEILONGJIANG = "23";
	public final static String SHANGHAI = "31";
	public final static String JIANGSU = "32";
	public final static String ZHEJIANG = "33";
	public final static String ANHUI = "34";
	public final static String FUJIAN = "35";
	public final static String JIANGXI = "36";
	public final static String SHANDONG = "37";
	public final static String HENAN = "41";
	public final static String HUBEI = "42";
	public final static String HUNAN = "43";
	public final static String GUANGDONG = "44";
	public final static String GUANGXI = "45";
	public final static String HAINAN = "46";
	public final static String CHONGQING = "50";
	public final static String SICHUAN = "51";
	public final static String GUIZHOU = "52";
	public final static String YUNNAN = "53";
	public final static String XIZANG = "54";
	public final static String SHAN_XI = "61";
	public final static String GANSU = "62";
	public final static String QINGHAI = "63";
	public final static String NINGXIA = "64";
	public final static String XINJIANG = "65";
	public final static String TAIWAN = "71";
	public final static String XIANGGANG = "81";
	public final static String AOMEN = "82";
	
	
	
	public static String getAreaCode(String area){
		if("北京".equals(area)){
			return BEIJING;
		}else if("上海".equals(area)){
			return SHANGHAI;
		}else if("天津".equals(area)){
			return TIANJING;
		}else if("重庆".equals(area)){
			return CHONGQING;
		}else if("辽宁".equals(area)){
			return LIAONING;
		}else if("吉林".equals(area)){
			return JILIN;
		}else if("黑龙江".equals(area)){
			return HEILONGJIANG;
		}else if("河北".equals(area)){
			return HEBEI;
		}else if("山西".equals(area)){
			return SHANXI;
		}else if("内蒙古".equals(area)){
			return NEIMENGGU;
		}else if("山东".equals(area)){
			return SHANDONG;
		}else if("江苏".equals(area)){
			return JIANGSU;
		}else if("安徽".equals(area)){
			return ANHUI;
		}else if("浙江".equals(area)){
			return ZHEJIANG;
		}else if("福建".equals(area)){
			return FUJIAN;
		}else if("江西".equals(area)){
			return JIANGXI;
		}else if("广东".equals(area)){
			return GUANGDONG;
		}else if("广西".equals(area)){
			return GUANGXI;
		}else if("海南".equals(area)){
			return HAINAN;
		}else if("湖北".equals(area)){
			return HUBEI;
		}else if("湖南".equals(area)){
			return HUNAN;
		}else if("河南".equals(area)){
			return HENAN;
		}else if("宁夏".equals(area)){
			return NINGXIA;
		}else if("新疆".equals(area)){
			return XINJIANG;
		}else if("青海".equals(area)){
			return QINGHAI;
		}else if("陕西".equals(area)){
			return SHAN_XI;
		}else if("甘肃".equals(area)){
			return GANSU;
		}else if("四川".equals(area)){
			return SICHUAN;
		}else if("云南".equals(area)){
			return YUNNAN;
		}else if("贵州".equals(area)){
			return GUIZHOU;
		}else if("西藏".equals(area)){
			return XIZANG;
		}else if("香港".equals(area)){
			return XIANGGANG;
		}else if("澳门".equals(area)){
			return AOMEN;
		}else if("台湾".equals(area)){
			return TAIWAN;
		}
		//没有找到地区码，则返回空�?
		return "";
	}
	
	
	
}
 